let mongoose=require("mongoose");
let addSchema=require("./addSchema.js")


let infoModel=new mongoose.Schema({
    "title":{
        type:String,
        // required:true,
        minlength:1,
        trim:true,
    },
    "date":{
        type:Date,
        // required:true,
        trim:true,
    },
    "image":[{
        type:addSchema,
        requred:true,
        trim:true,
    }],

    "comment":[{
        type:String,
    }]
},{"validateBeforeSave":"true"});//配置

module.exports=mongoose.model("infoModel",infoModel,"info");//导出
